﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _053
{
    internal class Program
    {
        static unsafe void Main(string[] args)
        {
            int[] list = { 10, 100, 200 };
            fixed (int* ptr = list)
                /*显示指针中数组地址*/
                for (int i = 0; i < 3; i++)
                {
                    Console.WriteLine("list[{0}]的内存地址为：{1}", i, (int)(ptr + i));
                    Console.WriteLine("list[{0}]的值为：{1}",i,*(ptr+i));
                }
            Console.ReadKey();
        }
    }
}
